﻿using StarLabel.label.item;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;

namespace MyLabelPlugin
{
    /// <summary>
    /// 实现字符反转
    /// ABC->CBA
    /// </summary>
    public class ReverseItem : TextItem
    {
        public ReverseItem(XmlElement el) : base(el)
        {

        }

        public override void DrawLabel(float x, float y, string labelText, string rotation)
        {
            char[] arr = labelText.ToCharArray();

            Array.Reverse(arr);

            base.DrawLabel(x, y, new string(arr), rotation);

        }

        protected override void parseFromXml()
        {
            base.parseFromXml();
        }
    }
}
